home *** CD-ROM | disk | FTP | other *** search
/ SGI Varsity Update 1998 August / SGI Varsity Update 1998 August.iso / relnotes / c++_fe / ch1.z / ch1
Text File  |  1998-07-29  |  85KB  |  2,709 lines

  1.  
  2.  
  3.  
  4.                                      - 1 -
  5.  
  6.  
  7.  
  8.           7.2.1 C++ Release Notes
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.           DDDDooooccccuuuummmmeeeennnntttt NNNNuuuummmmbbbbeeeerrrr 000000007777....2222666600006666----000011110000
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.                                      - 2 -
  67.  
  68.  
  69.  
  70.           1.  _I_n_t_r_o_d_u_c_t_i_o_n
  71.  
  72.           The Silicon Graphics C++ Compiler is an environment for
  73.           compiling programs written in the C++ programming language.
  74.           This environment allows access to standard IRIX features and
  75.           to the Graphics Library.
  76.  
  77.           The MIPSpro 7.2.1  release of the compiler is a native C++
  78.           compiler based on a frontend from the Edison Design Group.
  79.  
  80.           The latest set of compilers, invoked when -n32, -64, -mips3
  81.           or -mips4 is specified on the command-line, is based on the
  82.           n32/64 ABI, introduced with the 6.2 compilers.
  83.  
  84.           For backwards compatibility, the older ucode-based compilers
  85.           are also bundled with this release; these can be invoked
  86.           with -32,  -mips1, or -mips2.
  87.  
  88.           Note that the n32/64 compilers have been available for over
  89.           a year and we strongly recommend that you use these. Note
  90.           also that these n32/64 compilers closely reflect the C++
  91.           draft in terms of the language accepted and also provide the
  92.           features and performance enhancements described in detail
  93.           subsequently in these release notes.  There will be no
  94.           further development work on the ucode-based compilers.
  95.  
  96.  
  97.           The n32 and 64-bit versions are based on release 2.34 of the
  98.           Edison frontend.
  99.  
  100.           The 32-bit version is based on release 2.29 of the Edison
  101.           frontend.
  102.  
  103.           The old frontend based on release 3.0.1 of the USL C++
  104.           Translator (_c_f_r_o_n_t), is also available by specifying the
  105.           options -_3_2 -_u_s_e__c_f_r_o_n_t. Note that the use of this option is
  106.           being deprecated and the _c_f_r_o_n_t compiler will no longer be
  107.           supported in future releases.
  108.  
  109.  
  110.           1.1  _I_n_s_t_a_l_l_a_t_i_o_n__I_n_f_o_r_m_a_t_i_o_n
  111.  
  112.           This section lists supplemental information to the _I_R_I_S
  113.           _S_o_f_t_w_a_r_e _I_n_s_t_a_l_l_a_t_i_o_n _G_u_i_d_e.  The information listed here is
  114.           product-specific; use it with the installation guide to
  115.           install this product.
  116.  
  117.           _N_O_T_E:  Starting with the 7.2 release, the C++ compiler
  118.           front-ends are packaged in their own subsystem on a separate
  119.           CD. For proper installation, you must install _c_o_m_p_i_l_e_r__d_e_v,
  120.           _c_o_m_p_i_l_e_r__e_o_e, _c++__e_o_e and _c++__d_e_v from the IRIX Development
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.                                      - 3 -
  133.  
  134.  
  135.  
  136.           Foundation CD, as well as _c++__f_e from the MIPSpro C++
  137.           Compiler CD.
  138.  
  139.           The runtime libraries (DSOs) in the compiler_eoe and c++_eoe
  140.           subsystems are identical to what was shipped on the
  141.           corresponding IRIX releases and are provided as a
  142.           convenience. However, the subsystems will appear as upgrades
  143.           under inst, because changes have been made to certain non-
  144.           runtime library files.
  145.  
  146.           If, however, you need the latest runtime library fixes you
  147.           must install the subsystems from patch 2758 on top of this
  148.           image.
  149.  
  150.  
  151.           _c++__f_e (On MIPSpro C++ CD) contains:
  152.  
  153.              +o _f_e_c_c, the 64-bit and n32 C++ compiler frontend.
  154.  
  155.              +o _e_d_g_c_p_f_e, the 32-bit C++ compiler frontend.
  156.  
  157.              +o _e_d_g_c_p_f_e._e_h, the 32-bit C++ compiler frontend with
  158.                support for exception handling.
  159.  
  160.              +o Online manual page for _C_C(1).
  161.  
  162.  
  163.           _c++__d_e_v (On IRIX Development Foundation) contains:
  164.  
  165.              +o _C_C, the C++ compiler driver (not to be confused with
  166.                _c_c).
  167.  
  168.              +o The utilities _e_d_g__p_r_e_l_i_n_k, _c++_p_a_t_c_h and _c++_f_i_l_t.
  169.  
  170.              +o For users wishing to use the old frontend, _c_f_r_o_n_t, a
  171.                language translator for C++-to-C translation, and the
  172.                utilities _m_a_r_k_c++, _p_t_c_o_m_p, and _p_t_l_i_n_k. (_N_O_T_E: tttthhhheeee
  173.                ccccffffrrrroooonnnntttt----bbbbaaaasssseeeedddd ccccoooommmmppppiiiillllaaaattttiiiioooonnnn ssssyyyysssstttteeeemmmm iiiissss oooobbbbssssoooolllleeeesssscccceeeennnntttt,,,, aaaannnndddd
  174.                wwwwiiiillllllll bbbbeeee rrrreeeemmmmoooovvvveeeedddd iiiinnnn aaaa ffffuuuuttttuuuurrrreeee rrrreeeelllleeeeaaaasssseeee).
  175.  
  176.              +o The libraries _l_i_b_c_o_m_p_l_e_x._a, and _l_i_b_m_a_n_g_l_e._a.
  177.  
  178.              +o Include files specific to C++.
  179.  
  180.              +o These release notes.
  181.  
  182.              +o _C++ _P_r_o_g_r_a_m_m_e_r'_s _G_u_i_d_e, which includes the hard-copy
  183.                _C_C(1) manual page.
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.                                      - 4 -
  199.  
  200.  
  201.  
  202.           The 32-bit C++ libraries /_u_s_r/_l_i_b/_l_i_b_C._s_o and
  203.           /_u_s_r/_l_i_b/_l_i_b_C_s_u_p._s_o are installed in the subsystem
  204.           _c++__e_o_e._s_w._l_i_b.  This allows application libraries written
  205.           in C++ to be used on systems that do not have C++ installed.
  206.           Note that these libraries are dynamic shared objects and not
  207.           an archive.  There are also   non-shared archive form of the
  208.           libraries, /_u_s_r/_l_i_b/_n_o_n_s_h_a_r_e_d/_l_i_b_C._a, and
  209.           /_u_s_r/_l_i_b/_n_o_n_s_h_a_r_e_d/_l_i_b_C_s_u_p._a.
  210.  
  211.           Note: The 64-bit and n32 versions of these libraries are
  212.              available in /_u_s_r/_l_i_b_6_4/ and /_u_s_r/_l_i_b_3_2/ directories
  213.              respectively.
  214.  
  215.              Note:  Packaged with this software is a separate sheet
  216.                     that contains the Software License Agreement.
  217.                     This software is provided to you solely under the
  218.                     terms and conditions of the Software License
  219.                     Agreement.  Please take a few moments to review
  220.                     the Agreement.
  221.  
  222.  
  223.           1.2  _R_e_l_e_a_s_e__I_d_e_n_t_i_f_i_c_a_t_i_o_n__I_n_f_o_r_m_a_t_i_o_n_
  224.  
  225.           Following is the release identification information for the
  226.           7.2.1 C++ Compiler.
  227.  
  228.                                     C++ Compiler
  229.           SSSSooooffffttttwwwwaaaarrrreeee OOOOppppttttiiiioooonnnn PPPPrrrroooodddduuuucccctttt
  230.                                     7.2.1
  231.           VVVVeeeerrrrssssiiiioooonnnn
  232.                                     SC4-C++-7.2.1
  233.           PPPPrrrroooodddduuuucccctttt CCCCooooddddeeee
  234.                                     IRIX 6.2 (or higher)
  235.                                     IRIX Development
  236.                                     Foundation 1.1
  237.           SSSSooooffffttttwwwwaaaarrrreeee RRRReeeeqqqquuuuiiiirrrreeeemmmmeeeennnnttttssss
  238.  
  239.  
  240.  
  241.  
  242.  
  243.           1.3  _O_n_l_i_n_e__R_e_l_e_a_s_e__N_o_t_e_s
  244.  
  245.           After you install the online documentation for a product
  246.           (the _r_e_l_n_o_t_e_s subsystem), you can view the release notes on
  247.           your screen.
  248.  
  249.           If you have a graphics system, select ``Release Notes'' from
  250.           the Tools submenu of the Toolchest. This displays the
  251.           _g_r_e_l_n_o_t_e_s(1) graphical browser for the online release notes.
  252.           Refer to the _g_r_e_l_n_o_t_e_s(1) man page for information on
  253.           options to this command.
  254.  
  255.           If you do not have a graphics system, you can use the
  256.           _r_e_l_n_o_t_e_s command.  Refer to the _r_e_l_n_o_t_e_s(1) man page for
  257.           accessing the online release notes.
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.                                      - 5 -
  268.  
  269.  
  270.  
  271.           1.4  _P_r_o_d_u_c_t__S_u_p_p_o_r_t
  272.  
  273.           Silicon Graphics, Inc., provides a comprehensive product
  274.           support and maintenance program for its products.
  275.  
  276.           If you are in the U.S. or Canada and would like support for
  277.           your Silicon Graphics-supported products, contact the
  278.           Technical Assistance Center at 1-800-800-4SGI.
  279.  
  280.           If you are outside the U.S. or Canada, contact the Silicon
  281.           Graphics subsidiary or authorized distributor in your
  282.           country.
  283.  
  284.           1.5  _C_+_+__C_o_m_p_i_l_e_r__(_F_r_o_n_t_-_E_n_d_)__S_u_b_s_y_s_t_e_m_s
  285.  
  286.           Following is a description of the C++ Compiler subsystems:
  287.  
  288.           _c++__f_e._s_w._c++                 The C++ Compiler Front-ends
  289.                                         (default)
  290.  
  291.           _c++__f_e._m_a_n._r_e_l_n_o_t_e_s           These release notes (default)
  292.  
  293.           _c++__f_e._m_a_n._c++                The C++ Front-end Compiler Man
  294.                                         Pages (default)
  295.  
  296.  
  297.           1.6  _L_i_c_e_n_s_i_n_g__I_n_f_o_r_m_a_t_i_o_n
  298.  
  299.  
  300.  
  301.           1.6.1  _I_n_t_r_o_d_u_c_t_i_o_n
  302.  
  303.  
  304.           Your copy of the MIPSpro C++ Compiler requires a software
  305.           license in order to operate.  This section defines some
  306.           important software licensing terms, describes the basic
  307.           procedure for obtaining, installing, and testing a software
  308.           license for MIPSpro C++ Compiler, and lists a web site,
  309.           addresses, and phone numbers that you can use to contact
  310.           Silicon Graphics License Administration.
  311.  
  312.           For more information about installing and troubleshooting
  313.           software licenses you can look in the CD liner notes or
  314.           visit the web page:
  315.           http://www.sgi.com/Support/Licensing/install_docs.html or
  316.           Silicon Graphics' licensing website:
  317.           http://www.sgi.com/Products/license.html
  318.  
  319.           For in depth detail on FLEXlm licensing, see the FLEXlm End
  320.           User's Manual, which covers using and administering FLEXlm
  321.           software licenses. The FLEXlm User's Manual, is included in
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.                                      - 6 -
  334.  
  335.  
  336.  
  337.           the system software documentation; the online InSight
  338.           version is in the subsystem license_eoe.books.FlexLM_EUM
  339.           which is on the IRIX Development Foundation CD for IRIX 6.2,
  340.           6.3, 6.4. It is on the IRIX Foundation CD for IRIX 6.5.
  341.  
  342.           Your purchased software is delivered with a label that
  343.           includes a temporary license and an Entitlement ID.  The
  344.           temporary license allows you to use the software until you
  345.           obtain your permanent license. However, your entitlement ID
  346.           number makes it possible to obtain your permanent license
  347.           instantly through Silicon Graphics' licensing website or
  348.           email autobot. For WEB site and email address see
  349.           "Contacting Silicon Graphics License Administration" at the
  350.           end of this chapter of the release notes.
  351.  
  352.  
  353.           1.6.2  _A__F_e_w__D_e_f_i_n_i_t_i_o_n_s
  354.  
  355.  
  356.           A software license is a collection of information that,
  357.           after installation, allows you to use a licensed software
  358.           product on one or more systems.
  359.  
  360.           The software license information includes the license type,
  361.           the license expiration date, a license password, a system ID
  362.           number (/etc/sysinfo -s), and additional information
  363.           concerning the license and licensed software.  Floating
  364.           licenses have the host name (/sbin/uname -n) as part of the
  365.           license.
  366.  
  367.           There are two types of software licenses, node-locked and
  368.           floating:
  369.  
  370.  
  371.           1.6.2.1  _n_o_d_e_-_l_o_c_k_e_d
  372.  
  373.  
  374.           A node-locked license is installed on a particular system
  375.           (node) and allows the licensed software to run on that
  376.           system.
  377.  
  378.           For this release there are four different types of
  379.           nodelocked licenses each corresponding to a different
  380.           product pricing tier.
  381.  
  382.              +o The first tier allows you to run MIPSpro C on a system
  383.                of two or less processors.  It contains "CPU 2" in its
  384.                VENDOR STRING field.
  385.  
  386.              +o The second tier allows you to run MIPSpro C on a system
  387.                of eight or less processors.  It contains "CPU 8" in
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.                                      - 7 -
  400.  
  401.  
  402.  
  403.                its VENDOR STRING field.
  404.  
  405.              +o The third tier allows you to run MIPSpro C on a system
  406.                of 32 or less processors.  It contains "CPU 32" in its
  407.                VENDOR STRING field.
  408.  
  409.              +o The fourth tier allows you to run MIPSpro C on a system
  410.                of any number of processors.  It does not contain a
  411.                VENDOR STRING field.
  412.  
  413.  
  414.           1.6.2.2  _f_l_o_a_t_i_n_g
  415.  
  416.  
  417.           A floating license allows the licensed software to run on
  418.           one or more systems in the network simultaneously. The
  419.           number of systems (nodes) allowed is included in the
  420.           software license information.
  421.  
  422.           When an application requires a license from a license
  423.           server, the floating license points the client to the
  424.           license server (server name and license file path are
  425.           included with the license and copied on all client systems).
  426.           The FLEXlm license daemon, lmgrd, is responsible for
  427.           checking out/in licenses (tokens) to/from client systems. As
  428.           long as the number of licenses checked out to clients at a
  429.           given time is less than the encrypted maximum number of
  430.           concurrent users no user is denied access. Once the maximum
  431.           number is reached, the next request for a license will be
  432.           denied.
  433.  
  434.           Floating licenses have the advantage of cost, since a
  435.           license can be shared over many infrequent users, but they
  436.           are harder to install and administer. Floating license
  437.           check-out times can also vary depending on the load of the
  438.           network and the time needed to reach the license server.
  439.  
  440.  
  441.  
  442.           1.6.2.3  _E_n_t_i_t_l_e_m_e_n_t__I_D
  443.  
  444.  
  445.           The Entitlement ID is a 15 digit number (shipped with the
  446.           software) which allows your permanent license request to be
  447.           processed and approved in seconds.
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.                                      - 8 -
  466.  
  467.  
  468.  
  469.           1.6.3  _O_b_t_a_i_n_i_n_g__a_n_d__I_n_s_t_a_l_l_i_n_g__a__S_o_f_t_w_a_r_e__L_i_c_e_n_s_e
  470.  
  471.  
  472.           This section explains the procedure for obtaining and
  473.           installing a software license:
  474.  
  475.  
  476.           1.6.3.1  _M_a_k_e _c_e_r_t_a_i_n _y_o_u _h_a_v_e _y_o_u_r _s_o_f_t_w_a_r_e _l_i_c_e_n_s_e
  477.                    _i_n_f_o_r_m_a_t_i_o_n
  478.  
  479.  
  480.           Software license information is distributed in several ways:
  481.           by WEB page, email, FAX, postal mail, or on sheets of paper
  482.           included with the product.
  483.  
  484.           If you are updating to this release of MIPSpro C++ Compiler
  485.           from an older release you need to obtain and install a new
  486.           license.
  487.  
  488.           If you have received both a temporary license and a
  489.           permanent software license, install the permanent license;
  490.           do not install the temporary license.
  491.  
  492.  
  493.           1.6.3.2  _I_d_e_n_t_i_f_y _t_h_e _s_y_s_t_e_m _o_n _w_h_i_c_h _y_o_u _w_i_l_l _i_n_s_t_a_l_l _t_h_e
  494.                    _s_o_f_t_w_a_r_e _l_i_c_e_n_s_e.
  495.  
  496.  
  497.           Because software license information usually must be
  498.           installed on a particular system, follow these guidelines:
  499.  
  500.           If the System ID field says ``ANY,'' then you can install
  501.           the license on any system you choose.
  502.  
  503.           Install a license on the machine which has a system ID (
  504.           /etc/sysinfo -s ) which matches the system ID in the
  505.           license.
  506.  
  507.  
  508.           1.6.3.3  _I_n_s_t_a_l_l _t_h_e _s_o_f_t_w_a_r_e _l_i_c_e_n_s_e (_t_e_m_p_o_r_a_r_y _o_r
  509.                    _p_e_r_m_a_n_e_n_t).
  510.  
  511.  
  512.           Licenses typically come with complete license installation
  513.           instructions.  Follow these instructions to install the
  514.           license. For more detailed license installation and trouble
  515.           shooting information see the web page:
  516.           http://www.sgi.com/Support/Licensing/install_docs.html
  517.  
  518.           Check the ``license type'' listed in the software license
  519.           information to find out whether the license is a node-locked
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.                                      - 9 -
  532.  
  533.  
  534.  
  535.           license or a floating license.  The installation procedure
  536.           depends on the license type:
  537.  
  538.           You can install the license "manually" or use the
  539.           LicenseManager(1M) tool.  You can bring up LicenseManager by
  540.           choosing ``License Manager'' from the System toolchest.
  541.  
  542.           If the license is a floating license, you may need to
  543.           configure the system on which you plan to install the
  544.           license as a license server.
  545.  
  546.  
  547.           1.6.3.4  _V_e_r_i_f_y _t_h_a_t _t_h_e _s_o_f_t_w_a_r_e _l_i_c_e_n_s_e _h_a_s _b_e_e_n
  548.                    _s_u_c_c_e_s_s_f_u_l_l_y _i_n_s_t_a_l_l_e_d.
  549.  
  550.  
  551.           To verify that the software license is working, try running
  552.           the MIPSpro C++ Compiler. The licensed program in this
  553.           product is: CC(1). The FEATURE NAME in the license of this
  554.           product appears as cpp.
  555.  
  556.           For this release, C++ compilations will not be terminated if
  557.           the license is absent or incorrectly installed.  However, a
  558.           warning  message similar to the following will be displayed:
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.                                      - 10 -
  598.  
  599.  
  600.  
  601.           %CC -c foo.cpp
  602.           Cannot find license file (-1,73:2) No such file or directory
  603.  
  604.            The MIPSpro C++ Compiler
  605.            (license FEATURE string = cpp)
  606.            requires a license password.
  607.  
  608.            For license installation and trouble shooting
  609.            information visit the web page:
  610.  
  611.                    http://www.sgi.com/Support/Licensing/install_docs.html
  612.  
  613.            To obtain a Permanent license (proof of purchase
  614.            required) or an Evaluation license please
  615.            visit our license request web page:
  616.  
  617.                    http://www.sgi.com/Products/license.html
  618.  
  619.                    or send a blank email message to:
  620.  
  621.                    license@sgi.com
  622.  
  623.            In North America, Silicon Graphics' customers may request
  624.            Permanent licenses by sending a facsimile to:
  625.  
  626.                    (650) 932-0537
  627.  
  628.                    or by calling our technical support hotline
  629.  
  630.                    1-800-800-4SGI
  631.  
  632.            If you are Outside of North America or you are not a Silicon
  633.            Graphics support customer then contact your local support provider.
  634.  
  635.  
  636.  
  637.           1.6.4  _C_o_n_t_a_c_t_i_n_g__S_i_l_i_c_o_n__G_r_a_p_h_i_c_s__L_i_c_e_n_s_e__A_d_m_i_n_i_s_t_r_a_t_i_o_n
  638.  
  639.  
  640.           If you are connected to the internet then you can request a
  641.           permanent license from any country in the world using either
  642.           of the following methods:
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.                                      - 11 -
  664.  
  665.  
  666.  
  667.              * WEB: Go the the web site:
  668.                http://www.sgi.com/Products/license.html
  669.                Look under the "License Request" section.
  670.  
  671.              * email: Send a blank email message to
  672.                license@sgi.com
  673.                You will be sent back a blank email license
  674.                request template with full instructions.
  675.  
  676.  
  677.           If are not connected to the internet and need to obtain a
  678.           software license, fill out the Software License Registration
  679.           sheet that was included inside the CD liner notes with the
  680.           software (or the replica in the Network License System
  681.           Administration Guide). Send or FAX the filled out Software
  682.           License Registration sheet to Silicon Graphics License
  683.           Administration or your local service provider. After your
  684.           request is received by Silicon Graphics or your local
  685.           service provider, you should receive a software license
  686.           within two business days.
  687.  
  688.           In the United States and Canada, Silicon Graphics License
  689.           Administration provides software license information to
  690.           Silicon Graphics customers. You can contact Silicon Graphics
  691.           License Administration in these ways:
  692.  
  693.  
  694.              * FAX: (650) 932-0537
  695.              * Mail:
  696.  
  697.                Software Licensing M/S 134
  698.                Silicon Graphics, Inc.
  699.                P.O. Box 7311
  700.                Mountain View, CA 94039-9600
  701.  
  702.  
  703.           In an emergency, you can telephone Silicon Graphics at (800)
  704.           800-4744.  If you are not in the United States or Canada, or
  705.           if you purchased the system or software from a vendor other
  706.           than Silicon Graphics, please contact your local service
  707.           provider.
  708.  
  709.  
  710.  
  711.           1.7  _I_n_s_t_a_l_l_a_t_i_o_n__M_e_t_h_o_d
  712.  
  713.           All of the subsystems for the C++ Compiler can be installed
  714.           using _i_n_s_t from IRIX.
  715.  
  716.           For the details of this procedure, consult the _1._1 _I_R_I_X
  717.           _D_e_v_e_l_o_p_m_e_n_t _F_o_u_n_d_a_t_i_o_n release notes.
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.                                      - 12 -
  730.  
  731.  
  732.  
  733.           1.8  _N_e_w__F_e_a_t_u_r_e_s__f_o_r__M_I_P_S_p_r_o__7_._2_._1
  734.  
  735.  
  736.           The following set of new features have been added in the
  737.           MIPSpro 7.2.1 release.
  738.  
  739.  
  740.           1.8.1  _N_e_w__F_l_a_g_s__f_o_r__c_o_m_p_i_l_i_n_g__w_i_t_h__p_r_e_c_o_m_p_i_l_e_d__h_e_a_d_e_r_s
  741.  
  742.           Several new options in the -LANG option group to control
  743.           compiling with precompiled headers.These options are:
  744.  
  745.              +o -LANG:pch=ON|OFF
  746.  
  747.                Precompiled header files contain a snapshot of all the
  748.                code preceding the "header stop" point, which is
  749.                generally the first token in the primary source file
  750.                that does not belong to a preprocessing directive. Use
  751.                of precompiled headers might speed up compilation in
  752.                certain cases. For details on precompiled header files,
  753.                see chapter 2 of _M_I_P_S_p_r_o _C_o_m_p_i_l_i_n_g _a_n_d _P_e_r_f_o_r_m_a_n_c_e
  754.                _T_u_n_i_n_g _G_u_i_d_e.  This option automatically uses or
  755.                creates a precompiled header file. This option cannot
  756.                be used with -LANG:use_pch or -LANG:create_pch.
  757.  
  758.              +o -LANG:create_pch=filename
  759.  
  760.                Create a precompiled header with the specified name.
  761.                This option cannot be used with -LANG:pch or
  762.                -LANG:use_pch.
  763.  
  764.              +o -LANG:use_pch=filename
  765.  
  766.                Use a precompiled header specified by file-name, if it
  767.                is valid for this compilation unit.  The compilation
  768.                will proceed with a warning if the pch file cannot be
  769.                used. This option cannot be used with -LANG:pch or
  770.                -LANG:create_pch.
  771.  
  772.              +o -LANG:pch_dir=directory-name
  773.  
  774.                The directory in which to search for and/or create a
  775.                precompiled header file. This option may be used with
  776.                -LANG:pch -LANG:create_pch and -LANG:use_pch. When used
  777.                with -LANG:create_pch or -LANG:use_pch the indicated
  778.                filename is tacked on to the directory specified by
  779.                this name, unless the file name is an absolute path
  780.                name.
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.                                      - 13 -
  796.  
  797.  
  798.  
  799.           1.8.2  _S_t_a_n_d_a_r_d__C_o_n_f_o_r_m_i_n_g__L_i_b_r_a_r_i_e_s
  800.  
  801.  
  802.           Names in the standard library are now in namespace std.
  803.           Standard header files can now be included without the
  804.           trailing .h (although the old convention also works).  For
  805.           Example:
  806.  
  807.  
  808.           Old Way (still works)           New Way (ANSI)
  809.           #include <vector.h>             #include <vector>
  810.                                           using std::vector;
  811.           vector<int> my_vector;          vector<int> my_vector;
  812.  
  813.  
  814.  
  815.  
  816.           1.8.3  _S_u_p_p_o_r_t__f_o_r__s_t_r_i_n_g__c_l_a_s_s
  817.  
  818.  
  819.           MIPSpro 7.2.1 C++ provides support for the string class in
  820.           conformance with the ANSI standard. For example:
  821.  
  822.           #include <string>
  823.           std::string my_string;      // string of chars
  824.           std::wstring my_string;     // string of wchar_t
  825.           std::basic_string<int> my_intstring; // string of user
  826.                                                // specified type
  827.  
  828.  
  829.           Better performance is however, still available through the
  830.           use of the rope class.
  831.  
  832.  
  833.  
  834.           1.9  _N_e_w__F_e_a_t_u_r_e_s__f_o_r__M_I_P_S_p_r_o__7_._2
  835.  
  836.  
  837.           The following set of new features were added in the MIPSpro
  838.           7.2 release.
  839.  
  840.  
  841.  
  842.           1.9.1  _M_I_P_S_p_r_o__A_u_t_o__P_a_r_a_l_l_e_l_i_z_i_n_g__O_p_t_i_o_n
  843.  
  844.  
  845.           The MIPSpro Auto Parallelizing Option is a new product which
  846.           provides support for automatic parallelization for the
  847.           MIPSpro 7.2 family of compilers. Similar to Power C Analyzer
  848.           and Power Fortran Analyzer, the Auto Parallelizing Option
  849.           will automatically try to parallelize C, C++, Fortran 77 and
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.                                      - 14 -
  862.  
  863.  
  864.  
  865.           Fortran 90 programs when -pfa or -pca is specified on he
  866.           compiler command-line. One copy of Auto Parallelizing Option
  867.           works for all four languages. It only supports the 64-bit
  868.           (-64) and new high performance 32-bit (-n32) ABI's. The old
  869.           32-bit ABI (-32) is not supported by this product.
  870.  
  871.  
  872.           1.9.2  _D_a_t_a__D_i_s_t_r_i_b_u_t_i_o_n__D_i_r_e_c_t_i_v_e_s
  873.  
  874.  
  875.           The MIPSpro 7.2 compiler operating in the n32 and 64-bit
  876.           mode provides for data distribution pragmas such as
  877.           distribute, and distribute-reshape, which allow for explicit
  878.           data parallelism to be exploited in a multi-processing
  879.           environment. This is in addition to the multi-processing MP
  880.           pragmas for which support has been provided since 7.1. The
  881.           programmer's guide describes the data distribution pragmas
  882.           and their use on multiprocessing machines such as the Origin
  883.           series.
  884.  
  885.  
  886.           1.9.3  _N_e_w__P_a_r_a_l_l_e_l__P_r_a_g_m_a__O_p_t_i_o_n_s
  887.  
  888.           MIPSpro 7.2 now supports some new optional arguments to the
  889.           pfor parallel pragmas when -mp is specified on the compiler
  890.           command-line: onto, nest, local, lastlocal, affinity, and
  891.           reduction.  Also, the synchronize pragma can now be used
  892.           outside of parallel regions.  See the MIPSpro C and C++
  893.           Pragmas document for more information on these parallel
  894.           pragmas.
  895.  
  896.  
  897.           1.9.4  _N_e_w__S_y_m_b_o_l__S_t_o_r_a_g_e__D_i_r_e_c_t_i_v_e_s
  898.  
  899.           Two new directives have been added in MIPSpro 7.2 to control
  900.           the way symbols are stored: ALIGN_SYMBOL and FILL_SYMBOL.
  901.           The ALIGN_SYMBOL directive aligns the start of symbol at a
  902.           specified alignment boundary. The FILL_SYMBOL directive pads
  903.           symbol with additional storage so that the symbol is assured
  904.           not to overlap with any other data item within the storage
  905.           of the specified size. The additional padding required is
  906.           divided between each end of the specified variable.
  907.  
  908.  
  909.           1.9.5  _V_a_r_i_a_b_l_e__L_e_n_g_t_h__A_r_r_a_y_s
  910.  
  911.           MIPSpro 7.2 now supports variable length arrays. Array dummy
  912.           arguments and local arrays can now be declared as variable
  913.           length arrays rather than as pointers.  This allows the
  914.           compiler to make assumptions about aliasing and can allow
  915.           more optimizations to be applied to code containing
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.                                      - 15 -
  928.  
  929.  
  930.  
  931.           references to the array.  This is particularly beneficial
  932.           for parallelization.  The syntax for variable length arrays
  933.           is:
  934.  
  935.           int foo( int n, float a[n][n] ) {
  936.              float b[n];
  937.           }
  938.  
  939.           In the example above, dummy argument a and local variable b
  940.           are both variable length arrays.
  941.  
  942.           Variable length arrays are provided in C++ as an
  943.           experimental feature and may not work in the presence of C++
  944.           features such as templates and exceptions.
  945.  
  946.  
  947.           1.9.6  _F_r_e_q_u_e_n_c_y__h_i_n_t__p_r_a_g_m_a_s
  948.  
  949.           MIPSpro 7.2 now supports a new pragma "#pragma
  950.           mips_freqency_hint" that is used to tell the compiler that a
  951.           branch or function is rarely executed. The compiler uses
  952.           this information to make better optimization decisions. A
  953.           branch can be marked a infreqently taken in this fashion:
  954.  
  955.           if ( a < b ) {
  956.           #pragma mips_frequency_hint NEVER
  957.              printf("error condition0);
  958.           }
  959.  
  960.           While a function can be so marked this way:
  961.  
  962.           void handle_error( int i );
  963.           #pragma mips_frequency_hint NEVER handle_error
  964.  
  965.           Frequency information about a function gets propogated to
  966.           all instances where the function is used.  So a branch that
  967.           contains a call to an infrequent function is considered
  968.           infrequently executed itself.
  969.  
  970.           1.9.7  _P_R_I_N_T_F_L_I_K_E__l_i_n_t__s_t_y_l_e__c_o_m_m_e_n_t
  971.  
  972.           This comment applies lint style check to the first (n-1)
  973.           arguments as usual. The nth argument is interpreted as a
  974.           printf format string that is used to check the remaining
  975.           arguments.
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.                                      - 16 -
  994.  
  995.  
  996.  
  997.           1.9.8  _S_C_A_N_F_L_I_K_E__l_i_n_t__s_t_y_l_e__c_o_m_m_e_n_t
  998.  
  999.           This comment applies lint style check to the first (n-1)
  1000.           arguments as usual. The nth argument is interpreted as a
  1001.           scanf format string that is used to check the remaining
  1002.           arguments.
  1003.  
  1004.  
  1005.           1.10  _N_e_w__B_o_o_k_s
  1006.  
  1007.           The _M_I_P_S_P_r_o _C _a_n_d _C++ _P_r_a_g_m_a_s is now available as an online
  1008.           document in the subsystem _c_o_m_p_i_l_e_r__d_e_v._b_o_o_k_s._P_r_a_g_m_a_s. This
  1009.           revision of the manual, however, omits several pragmas that
  1010.           are supported:
  1011.  
  1012.  
  1013.           1.10.1  _#_p_r_a_g_m_a__c_o_n_c_u_r_r_e_n_t
  1014.  
  1015.  
  1016.           #pragma concurrent instructs the compiler, when analyzing
  1017.           the loop immediately following this assertion, to ignore all
  1018.           dependences between two references to the same array.
  1019.  
  1020.  
  1021.           1.10.1.1  _U_s_i_n_g__#_p_r_a_g_m_a__c_o_n_c_u_r_r_e_n_t
  1022.  
  1023.  
  1024.           The syntax of #pragma concurrent is as follows:
  1025.  
  1026.  
  1027.           #pragma concurrent
  1028.  
  1029.  
  1030.           There are five facts to be aware of when using this pragma:
  1031.  
  1032.  
  1033.              +o If multiple loops in a nest can be parallelized,
  1034.                #pragma concurrent causes the compiler to prefer the
  1035.                loop immediately following the pragma.
  1036.  
  1037.              +o Applying this pragma to an inner loop may cause the
  1038.                loop to be made outermost by the compiler's loop
  1039.                interchange operations.
  1040.  
  1041.  
  1042.              +o #pragma concurrent does not affect how the compiler
  1043.                analyzes function calls.
  1044.  
  1045.  
  1046.              +o #pragma concurrent does not affect how the compiler
  1047.                analyzes dependences between two potentially aliased
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.                                      - 17 -
  1060.  
  1061.  
  1062.  
  1063.                pointers.
  1064.  
  1065.  
  1066.              +o If there are real dependences between array references,
  1067.                #pragma concurrent may cause the compiler to generate
  1068.                incorrect code.
  1069.  
  1070.  
  1071.  
  1072.           1.10.2  _#_p_r_a_g_m_a__c_o_n_c_u_r_r_e_n_t__c_a_l_l
  1073.  
  1074.  
  1075.           The #pragma concurrent call directive instructs the compiler
  1076.           to ignore the dependences of subroutine and function calls
  1077.           contained in the loop that follows the directive.
  1078.  
  1079.  
  1080.           1.10.2.1  _U_s_i_n_g__#_p_r_a_g_m_a__c_o_n_c_u_r_r_e_n_t__c_a_l_l
  1081.  
  1082.  
  1083.           The syntax for #pragma concurrent call is as follows:
  1084.  
  1085.  
  1086.           #pragma concurrent call
  1087.  
  1088.  
  1089.           The pragma applies to the loop that immediately follows it
  1090.           and to all loops nested inside that loop.  To prevent
  1091.           incorrect parallelization, make sure the following
  1092.           conditions are met:
  1093.  
  1094.  
  1095.              +o A function inside the loop cannot read from a location
  1096.                that is written to during another iteration. This rule
  1097.                does not apply to a location that is a local variable
  1098.                declared inside the function.
  1099.  
  1100.              +o A function inside the loop cannot write to a location
  1101.                that is read from or written to during another
  1102.                iteration. This rule does not apply to a location that
  1103.                is a local variable declared inside the function.
  1104.  
  1105.  
  1106.           1.10.2.2  _E_x_a_m_p_l_e_s__o_f__#_p_r_a_g_m_a__c_o_n_c_u_r_r_e_n_t__c_a_l_l
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.                                      - 18 -
  1126.  
  1127.  
  1128.  
  1129.           Example 1
  1130.  
  1131.           In this example the compiler ignores the dependences in the function
  1132.           fred() when it analyzes the following loop:
  1133.  
  1134.           #pragma concurrent call
  1135.           for (i = 0; i < N; i++0
  1136.           {
  1137.               fred(...)
  1138.               ...
  1139.           }
  1140.  
  1141.           void fred (...)
  1142.           {
  1143.               ...
  1144.           }
  1145.  
  1146.           Example 2
  1147.  
  1148.           The following code shows an illegal use of the assertion.
  1149.           Function fred() writes to variable T, which is also read
  1150.           from by wilma() during other iterations.
  1151.  
  1152.           float A[M], B[M];
  1153.           int i, T;
  1154.           #pragma concurrent call
  1155.           for (i = 0; i < M; i++)
  1156.           {
  1157.               fred(B, i, &T);
  1158.               wilma(A, i, &T);
  1159.           }
  1160.  
  1161.           void fred(float B[], int i, int* T)
  1162.           {
  1163.               *T = B[i];
  1164.           }
  1165.  
  1166.           void wilma(float A[], int i, int* T)
  1167.           {
  1168.               A[i] = *T;
  1169.           }
  1170.  
  1171.           By localizing the variable T, you can manually parallelize
  1172.           the above example safely. But the compiler does not know to
  1173.           localize T, and it illegally parallelizes the loop because of
  1174.           the assertion.
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.                                      - 19 -
  1192.  
  1193.  
  1194.  
  1195.           1.10.3  _#_p_r_a_g_m_a__p_e_r_m_u_t_a_t_i_o_n
  1196.  
  1197.  
  1198.           When placed inside a subroutine, #pragma permutation tells
  1199.           the compiler that the specified array is a permutation
  1200.           array.
  1201.  
  1202.  
  1203.           1.10.3.1  _U_s_i_n_g__#_p_r_a_g_m_a__p_e_r_m_u_t_a_t_i_o_n
  1204.  
  1205.  
  1206.           The syntax of #pragma permutation is as follows:
  1207.  
  1208.  
  1209.           #pragma permutation (array)
  1210.  
  1211.  
  1212.           The variable array is the name of a permutation array. Every
  1213.           element of array has a distinct value. The directive does
  1214.           not require the permutation array to be dense. In other
  1215.           words, while every array[1] must have a distinct value,
  1216.           there can be gaps between those values, such as array[1] =
  1217.           1, array[2] = 4, array[3] = 9, and so on.
  1218.  
  1219.           You can use this assertion to parallelize loops that use
  1220.           arrays for indirect addressing. Without this directive, the
  1221.           compiler cannot determine that the array elements used as
  1222.           indexes are distinct.
  1223.  
  1224.           This pragma affects every loop in a subroutine, even those
  1225.           that appear ahead of it.
  1226.  
  1227.  
  1228.  
  1229.  
  1230.           1.11  _C_o_m_p_a_t_i_b_i_l_i_t_y__w_i_t_h__c_+_+__7_._1
  1231.  
  1232.           The 7.2   C++ compiler operating in 32-bit mode as well as
  1233.           n32 and 64-bit mode is fully link-compatible with code
  1234.           compiled with C++ 7.1 with the following exceptions (n32 and
  1235.           64-bit mode only):
  1236.  
  1237.           1.11.1  _-_e_x_p_e_r_i_m_e_n_t_a_l__f_l_a_g__n_o__l_o_n_g_e_r__s_u_p_p_o_r_t_e_d
  1238.  
  1239.           The flag -experimental, which could be used with the 7.1
  1240.           compiler to invoke an experimental version which supported
  1241.           namespaces, is no longer supported, since the released
  1242.           compiler now supports namespaces and other new features.
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.                                      - 20 -
  1258.  
  1259.  
  1260.  
  1261.           1.11.2  _R_u_n_t_i_m_e _c_h_a_n_g_e _i_n _s_e_m_a_n_t_i_c_s _o_f _c_o_p_y _a_s_s_i_g_n_m_e_n_t
  1262.                   _o_p_e_r_a_t_o_r _c_a_l_l_s
  1263.  
  1264.           This is a change in runtime behavior! It only affects you if
  1265.           you define an assignment operator in class B, but the type
  1266.           of argument that this operator accepts is not of type B.
  1267.  
  1268.           struct A {};
  1269.           struct B {
  1270.               B();
  1271.               B& operator= (const A&);
  1272.               operator A& ()  const;
  1273.           };
  1274.  
  1275.           main()
  1276.           {
  1277.              B b1, b2;
  1278.              b1 = b2;
  1279.              return 0;
  1280.           }
  1281.  
  1282.           With the 7.1 compilers, the statement b1 = b2 generated a
  1283.           call to the conversion operator function "operator A& ()
  1284.           const" to convert a B object to an object of type A followed
  1285.           by a call to operator function "B& operator= () const(A&)"
  1286.           to copy the A object.
  1287.  
  1288.           This behavior was incorrect since the function  "B&
  1289.           operator= (const A&)" is not a copy assignment operator. A
  1290.           copy assignment operator can take exactly one parameter of
  1291.           the form A, A&, const A&, volatile A&, or const volatile A&.
  1292.  
  1293.           With the 7.2 compilers, the frontend will implicitly
  1294.           generate a copy assignment operator of the form
  1295.           B::operator=(const B &) which will perform a bitwise copy.
  1296.           This may result in completely different runtime behavior.
  1297.           The compiler will warn in such cases with the following
  1298.           message:
  1299.  
  1300.           "t.c";, line 12: warning(3149): class "B" has no copy assignment operator. A
  1301.                   copy assignment operator of the form
  1302.                   "B::operator=(const B &)" has been implicitly defined. The
  1303.                   implicitly defined copy assignment operator will perform a bitwise
  1304.                   copy. Previous compiler versions may have used assignment operator
  1305.                   functions defined in this class with conversion operators as copy
  1306.                   assignment operators. This change may lead to different runtime
  1307.                   behavior. Define a copy assignment operator if necessary.
  1308.  
  1309.           The suggested approach to fix the problem is to define a
  1310.           copy assigment operator that performs the copy. In the above
  1311.           test case, one could add a member function in B:
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.                                      - 21 -
  1324.  
  1325.  
  1326.  
  1327.           B& operator= (const B& arg) {
  1328.             *this = ( const A&) arg; // Convert the argument to a 'A' object and
  1329.                                       // then call the operator= function.
  1330.           }
  1331.  
  1332.           1.11.3  _P_r_e_v_i_o_u_s_l_y__u_n_d_i_a_g_n_o_s_e_d__e_r_r_o_r__o_n__n_o_n_m_e_m_b_e_r__o_p_e_r_a_t_o_r_s
  1333.  
  1334.           Non-member operators have always required at least one class
  1335.           (or reference to class) parameter. Earlier compilers have
  1336.           occasionally failed to diagnose this problem, particularly
  1337.           when this happened in template functions. C++ 7.2 will
  1338.           always give you a compile time error for this.
  1339.  
  1340.           template <class T>
  1341.           class Ptr{
  1342.           };
  1343.  
  1344.           template <class T&>
  1345.           int operator!=(Ptr<T>* a, Ptr<T>* b); //Should be an error
  1346.  
  1347.           The fix is to remove any such functions; they could not
  1348.           possibly have been invoked in earlier compilers, so removing
  1349.           them cannot change program behavior.
  1350.  
  1351.           1.11.4  _A_m_b_i_g_u_i_t_y__w_i_t_h__c_o_n_d_i_t_i_o_n_a_l__o_p_e_r_a_t_o_r
  1352.  
  1353.           This issue pertains to ?: expressions where the left and
  1354.           right arms are of different types. For example:
  1355.  
  1356.           struct A {
  1357.              A();
  1358.              A(int);
  1359.              operator int();
  1360.           };
  1361.  
  1362.           void foo(int i,int j) {
  1363.              i ? A() : j; //AMBIGUOUS in 7.2 -n32
  1364.           }
  1365.  
  1366.           "foo.c", line 8: error(1324): more than one operator"?" matches these
  1367.                     operands:
  1368.                       built-in operator "expression ? class : class"
  1369.                       built-in operator "expression ? arithmetic : arithmetic"
  1370.                       operand types are: A : int
  1371.                       Recent changes to Ansi C++ draft standard may have
  1372.                       made this expression ambiguous. Please rewrite
  1373.                       the expression to remove the ambiguity. To get the old behavior
  1374.                       use the "-Wf,-old_conditional_operator_rules" flag.
  1375.                i ? A() : j; //AMBIGUOUS in 7.2 -n32
  1376.  
  1377.           In the example above, the compiler could determine the
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.                                      - 22 -
  1390.  
  1391.  
  1392.  
  1393.           return type of the ?: in two ways:
  1394.  
  1395.              +o Convert the A() to an int and make the result of int
  1396.                type
  1397.  
  1398.              +o Convert the int to an A, and make the result of type A
  1399.  
  1400.           It is therefore an ambiguous construct. It used to be that
  1401.           the compiler would always prefer converting the A() to an
  1402.           int, but the standard now makes this ambiguous. The
  1403.           suggested way of making this code work with all compilers is
  1404.           to use an explicit cast to make the result type unambiguous.
  1405.           In this case, what was probably intended was:
  1406.  
  1407.           i ? (int)A() : j;
  1408.  
  1409.           The other choice would be:
  1410.  
  1411.           i ? A() : (A)j
  1412.  
  1413.           If you cannot change your source code, use the
  1414.            "-Wf,-old_conditional_operator_rules" flag.
  1415.  
  1416.           1.11.5  _E_n_u_m_e_r_a_t_o_r_s__c_a_n_n_o_t__b_e__c_o_n_v_e_r_t_e_d__t_o__p_o_i_n_t_e_r_s
  1417.  
  1418.           An enum in C++ is not a numeric type, and there is no
  1419.           implicit conversion to a pointer.  The 7.1 compiler failed
  1420.           to diagnose this error.
  1421.  
  1422.           enum fruit {orange};
  1423.           void* p = orange; //This is an error
  1424.           "foo.c", line 2: error(1140): a value of type "fruit" cannot be used to
  1425.                     initialize an entity of type "void *"
  1426.             void* p = orange;
  1427.  
  1428.           The way to fix this is to explicitly cast the enum to an
  1429.           int.
  1430.  
  1431.           enum fruit {orange};
  1432.           void* p = (int)orange; //This is fine
  1433.  
  1434.           1.11.6  _N_e_w__k_e_y_w_o_r_d_s
  1435.  
  1436.           There are four new reserved words in C++ 7.2: "typename",
  1437.           "explicit", "namespace", and "mutable". All existing code
  1438.           should be modified so that it does not use these words as
  1439.           identifiers.  If for some reason you are unable to modify
  1440.           code that uses these reserved words (e.g. it's in a third
  1441.           party header), you can use any combination of the following
  1442.           options: -LANG:explicit=off, or -LANG:typename=off, or
  1443.           -LANG:namespace=off or -LANG:mutable=off Note that in a
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.                                      - 23 -
  1456.  
  1457.  
  1458.  
  1459.           future release "export" will also be made a keyword, so you
  1460.           should not be using this as an identifier.
  1461.  
  1462.  
  1463.  
  1464.           1.11.7  _S_t_a_n_d_a_r_d__p_l_a_c_e_m_e_n_t__n_e_w__c_a_n_n_o_t__b_e__p_r_e_e_m_p_t_e_d
  1465.  
  1466.           A placement version of operator new used to be defined as
  1467.           follows in new.h:
  1468.  
  1469.              void *operator new(size_t, void* p);
  1470.  
  1471.           The library used to provide the obvious implementation:
  1472.  
  1473.              void *operator new(size_t, void* p) {return p; }
  1474.  
  1475.           The C++ standard now states that the standard version of
  1476.           placement operator new cannot be preempted. This allows us
  1477.           to provide an inline version of placement operator new in
  1478.           new.h:
  1479.  
  1480.              inline void *operator new(size_t, void* p) { return p; }
  1481.  
  1482.           One consequence of this is that if you explicitly define
  1483.           your own version of placement operator new (whether inline
  1484.           or out-of-line) you will get an error.  In previous
  1485.           releases, it was possible to define your own version of
  1486.           placement operator new.
  1487.  
  1488.           For example:
  1489.  
  1490.           #include <new.h>
  1491.           inline void *operator new(size_t, void* p) { return p; }
  1492.  
  1493.           will get the following error:
  1494.  
  1495.           "foo.c", line 2: error(1220): function "operator new(size_t, void *)" has
  1496.                     already been defined
  1497.             inline void *operator new(size_t, void* p) { return p; }
  1498.  
  1499.           Note that this does not prevent you from defining your own
  1500.           versions of placement operator new which have parameter
  1501.           profiles which are different from the standard All of the
  1502.           above discussion also applies to operator new [].
  1503.  
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.                                      - 24 -
  1522.  
  1523.  
  1524.  
  1525.           1.12  _L_a_n_g_u_a_g_e__S_u_p_p_o_r_t_e_d
  1526.  
  1527.           1.12.1  _N_e_w__L_a_n_g_u_a_g_e__F_e_a_t_u_r_e_s__A_c_c_e_p_t_e_d
  1528.  
  1529.           The following features not in the C++ Annotated Reference
  1530.           Manual but in the current X3716/WG21 Working Paper are
  1531.           accepted (for the 64-bit and n32 compilers only):
  1532.  
  1533.              +o The dependent statement of an "if", "while", "do", or
  1534.                "for" statement is considered to be a scope, and the
  1535.                restriction on having such a dependent statement be a
  1536.                declaration is removed.
  1537.  
  1538.              +o The draft C++ standard specifies that the scope of a
  1539.                variable declared in the for-init-statement of a for-
  1540.                loop is the scope of the loop, not the surrounding
  1541.                scope.  This feature is now implemented, but because
  1542.                this is the first compiler release to implement it, and
  1543.                because the change could break a lot of existing code,
  1544.                it has been implemented only if -LANG:ansi-for-init-
  1545.                scope=on is specified on the command line.  The default
  1546.                behavior will be changed in a future release (possibly
  1547.                in the next release).  We strongly recommend that you
  1548.                start compiling with the -LANG:ansi-for-init-scope=on
  1549.                to find and correct code that does not conform to the
  1550.                draft standard.
  1551.  
  1552.              +o Qualified names are allowed in elaborated type
  1553.                specifiers.
  1554.  
  1555.              +o A global-scope qualifier is allowed in member
  1556.                references of the form x.::A::B or p->::A::B
  1557.  
  1558.              +o The precedence of the third operand of the ? operator
  1559.                is changed.
  1560.  
  1561.              +o If control reaches the end of the main routine, and
  1562.                main has an integral return type, it is treated as if a
  1563.                "return 0" statement were executed.
  1564.  
  1565.              +o Pointers to arrays with unknown bounds as parameter
  1566.                types are diagnosed as errors.
  1567.  
  1568.              +o A functional-notation cast of the form "A()" can be
  1569.                used even if A is a class without a nontrivial
  1570.                constructor.  The temporary created gets the same
  1571.                default initialization to zero as a static object of
  1572.                the class type.
  1573.  
  1574.              +o A cast can be used to select one out of a set of
  1575.                overloaded functions when taking the address of a
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.                                      - 25 -
  1588.  
  1589.  
  1590.  
  1591.                function.
  1592.  
  1593.              +o Template friend declarations and definitions are
  1594.                permitted in class definitions and class template
  1595.                definitions.
  1596.  
  1597.              +o Type template parameters are permitted to have default
  1598.                arguments.
  1599.  
  1600.              +o Function templates may have nontype template
  1601.                parameters.
  1602.  
  1603.              +o A reference to const volatile cannot be bound to an
  1604.                rvalue.
  1605.  
  1606.              +o Qualification conversions such as conversion from (T**)
  1607.                to T const * const * are allowed.
  1608.  
  1609.              +o Static data member declarations can be used to declare
  1610.                member constants.
  1611.  
  1612.              +o wchar_t is recognized as a keyword and a distinct type.
  1613.  
  1614.              +o bool is recognized.
  1615.  
  1616.              +o RTTI (runtime type-identification), including
  1617.                dynamic_cast and the typeid operator, is implemented.
  1618.  
  1619.              +o Array new and delete are implemented.
  1620.  
  1621.              +o New-style casts (static_cast, reinterpret_cast, and
  1622.                const-cast) are implemented.
  1623.  
  1624.              +o Definition of a nested class outside its enclosing
  1625.                class is allowed.
  1626.  
  1627.              +o "mutable" is accepted on nonstatic data member
  1628.                declarations.
  1629.  
  1630.              +o Namespaces are implemented, including "using"
  1631.                declarations and directives.  Access declarations are
  1632.                broadened to match the corrsponding "using"
  1633.                declarations.
  1634.  
  1635.              +o Explicit instantiation of templates is implemented.
  1636.  
  1637.              +o The "typename" keyword is recognized.
  1638.  
  1639.              +o "explicit" is accepted to declare nonconverting
  1640.                constructors.
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.                                      - 26 -
  1654.  
  1655.  
  1656.  
  1657.              +o Member templates are supported.
  1658.  
  1659.              +o The new specialization syntax (using "template<>") is
  1660.                implemented.
  1661.  
  1662.              +o Cv-qualifiers are retained on rvalues (in particular,
  1663.                on function return values).
  1664.  
  1665.              +o The distinction between trivial and nontrivial
  1666.                constructors has been implemented, as has the
  1667.                distinction between PODs and non-PODs with trivial
  1668.                constructors.
  1669.  
  1670.              +o The linkage specification is treated as part of the
  1671.                function type (affecting function overloading and
  1672.                implicit conversions).
  1673.  
  1674.              +o A typedef name may be used in an explicit destructor
  1675.                call.
  1676.  
  1677.              +o Placement delete is implemented.
  1678.  
  1679.              +o enum types are considered to be non-integral types.
  1680.  
  1681.              +o Partial specialization of class templates is
  1682.                implemented.
  1683.  
  1684.           1.12.2  _N_e_w__L_a_n_g_u_a_g_e__F_e_a_t_u_r_e_s__N_o_t__A_c_c_e_p_t_e_d
  1685.  
  1686.           The following features not in the ARM but in the X3J16/WG21
  1687.           Working Paper are not accepted:
  1688.  
  1689.              +o It is not possible to overload operators using
  1690.                functions that take enum types and no class types.
  1691.  
  1692.              +o The new lookup rules for member references of the form
  1693.                x.A and p->A::B are not yet implemented.
  1694.  
  1695.              +o enum types cannot contain values larger than can be
  1696.                contained in an int.
  1697.  
  1698.              +o reinterpret_cast does not allow casting a pointer to
  1699.                member of one class to a pointer to member of another
  1700.                class.
  1701.  
  1702.              +o Explicit qualification of template functions is not
  1703.                implemented.
  1704.  
  1705.              +o The new template compilation model is not yet
  1706.                implemented.
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.                                      - 27 -
  1720.  
  1721.  
  1722.  
  1723.              +o In a reference of the form f()->g(), with g a static
  1724.                member function, f() is not evaluated.
  1725.  
  1726.              +o Class name injection is not implemented.
  1727.  
  1728.              +o Putting a try/catch around the initializers and body of
  1729.                a constructor is not implemented.
  1730.  
  1731.              +o The notation ::template (and ->template, etc.) is not
  1732.                implemented.
  1733.  
  1734.              +o Template template parameters are not implemented.
  1735.  
  1736.              +o Certain restrictions are not yet enforced on the use of
  1737.                pointer-to-function types that involve exception
  1738.                specifications.
  1739.  
  1740.              +o "Koenig lookup" of function names on calls is not
  1741.                implemented.
  1742.  
  1743.              +o Finding friend functions of the argument types on name
  1744.                lookup on the function name in calls is not
  1745.                implemented.
  1746.  
  1747.              +o Digraphs and operator keywords are not recognized.
  1748.  
  1749.              +o Covariant return types are not supported.
  1750.  
  1751.              +o "extern inline" is not implemented.
  1752.  
  1753.           1.12.3  _F_e_a_t_u_r_e__M_a_c_r_o_s
  1754.  
  1755.           A number of language features can be disabled via
  1756.           commandline options.  When this happens certain macros which
  1757.           are normally defined remain undefined.  These can then be
  1758.           used in #ifdefs in source files to do conditional
  1759.           compilation based on whether or not these features are
  1760.           enabled.  The following feature macros are defined or not
  1761.           depending on whether or not the corresponding feature is
  1762.           enabled.
  1763.  
  1764.              +o __EXCEPTIONS is defined unless -LANG:exceptions=off is
  1765.                specified.
  1766.  
  1767.              +o _BOOL is defined unless -LANG:bool=off is specified.
  1768.  
  1769.              +o _WCHAR_T_IS_KEYWORD is defined unless -LANG:wchar_t=off
  1770.                is specified.
  1771.  
  1772.              +o _MUTABLE_IS_KEYWORD is defined unless -LANG:mutable=off
  1773.                is specified.
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.                                      - 28 -
  1786.  
  1787.  
  1788.  
  1789.              +o _EXPLICIT_IS_KEYWORD is defined unless
  1790.                -LANG:explicit=off is specified.
  1791.  
  1792.  
  1793.           1.13  _C_+_+__C_o_m_p_i_l_e_r__F_i_l_e_s
  1794.  
  1795.           After installing the C++ Compiler images from both the
  1796.           MIPSpro C++ CD and the IRIX Development Foundation CD, you
  1797.           should have the following files:
  1798.  
  1799.           /_u_s_r/_b_i_n/_C_C                      C++ compiler driver
  1800.  
  1801.           /_u_s_r/_l_i_b_3_2/_c_m_p_l_r_s/_f_e_c_c           The n32/64-bit compiler
  1802.                                            frontend
  1803.  
  1804.           /_u_s_r/_l_i_b_3_2/_c_m_p_l_r_s/_b_e             The n32/64-bit compiler
  1805.                                            backend
  1806.  
  1807.           /_u_s_r/_l_i_b/_D_C_C/_e_d_g_c_p_f_e             The 32-bit compiler
  1808.                                            frontend
  1809.  
  1810.           /_u_s_r/_l_i_b/_D_C_C/_e_d_g__p_r_e_l_i_n_k         The "prelinker" which
  1811.                                            controls template
  1812.                                            instantiation
  1813.  
  1814.           /_u_s_r/_l_i_b/_c++/_c++_p_a_t_c_h            C++ post-processor
  1815.  
  1816.           /_u_s_r/_i_n_c_l_u_d_e/_C_C                  C++ include file directory
  1817.  
  1818.           /_u_s_r/_i_n_c_l_u_d_e/_C_C/_e_x_c_e_p_t_i_o_n._h      Entities such as
  1819.                                            _b_a_d__e_x_c_e_p_t_i_o_n,
  1820.                                            _s_e_t__t_e_r_m_i_n_a_t_e, and
  1821.                                            _s_e_t__u_n_e_x_p_e_c_t_e_d required for
  1822.                                            exception handling.
  1823.  
  1824.           /_u_s_r/_i_n_c_l_u_d_e/_C_C/_s_t_d_e_x_c_e_p_t._h      Definition of the
  1825.                                            _s_t_d::_e_x_c_e_p_t_i_o_n class, which
  1826.                                            is the base class for any
  1827.                                            exceptions thrown by the
  1828.                                            C++ runtime
  1829.  
  1830.           /_u_s_r/_l_i_b/_l_i_b_c_o_m_p_l_e_x._a            Non-template C++ complex
  1831.                                            math library for 32-bit
  1832.                                            compiler
  1833.  
  1834.           /_u_s_r/_l_i_b_3_2/_l_i_b_C_o_m_p_l_e_x._a          Template-based C++ complex
  1835.                                            math library for n32
  1836.                                            compiler
  1837.  
  1838.           /_u_s_r/_l_i_b_3_2/_l_i_b_c_o_m_p_l_e_x._a          Non-template C++ complex
  1839.                                            math library for n32
  1840.  
  1841.  
  1842.  
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.                                      - 29 -
  1852.  
  1853.  
  1854.  
  1855.                                            compiler
  1856.  
  1857.           /_u_s_r/_l_i_b_6_4/_l_i_b_C_o_m_p_l_e_x._a          Template-based C++ complex
  1858.                                            math library for 64-bit
  1859.                                            compiler
  1860.  
  1861.           /_u_s_r/_l_i_b_6_4/_l_i_b_c_o_m_p_l_e_x._a          Non-template C++ complex
  1862.                                            math library for 64-bit
  1863.                                            compiler
  1864.  
  1865.           /_u_s_r/_l_i_b/_c++/_l_i_b_m_a_n_g_l_e._a         C++ name-demangler library
  1866.  
  1867.           /_u_s_r/_l_i_b/_c++/_c++_f_i_l_t             C++ name-demangling utility
  1868.  
  1869.           /_u_s_r/_c_a_t_m_a_n/_u__m_a_n/_c_a_t_1/_C_C._z      C++ compiler driver manual
  1870.                                            page
  1871.  
  1872.           /_u_s_r/_r_e_l_n_o_t_e_s/_C_C                 C++ Release Notes directory
  1873.  
  1874.           The following files are present only for supporting the old
  1875.           _c_f_r_o_n_t-based compiler, and will be unavailable in future
  1876.           releases:
  1877.  
  1878.           /_u_s_r/_l_i_b/_c++/_c_f_r_o_n_t              The old C++ Translator, for
  1879.                                            use with -use_cfront
  1880.  
  1881.           /_u_s_r/_l_i_b/_c++/_m_a_r_k_c++             The old utility to identify
  1882.                                            C++ files for _d_b_x(_1)
  1883.  
  1884.           /_u_s_r/_l_i_b/_c++/_p_t_c_o_m_p              Old tool for Template
  1885.                                            support for cfront
  1886.  
  1887.           /_u_s_r/_l_i_b/_c++/_p_t_l_i_n_k              Old tool for Template
  1888.                                            support for cfront
  1889.  
  1890.           "Note:"  The C++ libraries for the 32-bit compiler
  1891.           /_u_s_r/_l_i_b/_l_i_b_C._s_o and /_u_s_r/_l_i_b/_l_i_b_C_s_u_p._s_o are  installed from
  1892.           the subsystem _c++__e_o_e._s_w._l_i_b.  This allows application
  1893.           libraries written in C++ to be used on systems that do not
  1894.           have C++ installed.  The corresponding libraries for the
  1895.           64-bit and n32 compilers are in the directories /_u_s_r/_l_i_b_6_4
  1896.           and /_u_s_r/_l_i_b_3_2 respectively and are installed from the
  1897.           subsystems _c++__e_o_e_6_4._s_w._l_i_b and  _c++__e_o_e_3_2._s_w._l_i_b
  1898.           respectively.
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.                                      - 30 -
  1918.  
  1919.  
  1920.  
  1921.           1.14  _C_+_+__C_o_m_p_i_l_e_r__D_o_c_u_m_e_n_t_a_t_i_o_n
  1922.  
  1923.           Silicon Graphics has produced the following C++ Compiler
  1924.           documentation:
  1925.  
  1926.              +o _C_C(1) man page (printed and online version)
  1927.  
  1928.              +o _7._2  _C++ _R_e_l_e_a_s_e _N_o_t_e_s (this online document)
  1929.  
  1930.              +o Online manual (see the packing manifest above)
  1931.  
  1932.  
  1933.           1.15  _R_u_n_t_i_m_e__P_e_r_f_o_r_m_a_n_c_e__E_n_h_a_n_c_e_m_e_n_t_s
  1934.  
  1935.  
  1936.           The 7.2   C++ compiler operating in the n32 and 64-bit mode
  1937.           provides improved runtime performance. In particular,
  1938.           performance improvements from 10% to 50% over 7.1 are
  1939.           achieved by  enhancements in inlining,  alias analysis,
  1940.           scalar and struct optimizations, and loop optimizations.
  1941.  
  1942.           The MIPSpro Compiling And Performance Tuning Guide provides
  1943.           tips on how to get the best runtime performance from C and
  1944.           C++ programs.  Additionally the following option is provided
  1945.           for improved analysis of functions which take parameters by
  1946.           const reference.
  1947.  
  1948.  
  1949.           1.15.1  _c_o_n_s_t _r_e_f_e_r_e_n_c_e _p_a_r_a_m_e_t_e_r _o_p_t_i_m_i_z_a_t_i_o_n _w_i_t_h
  1950.                   -_L_A_N_G:_a_l_i_a_s__c_o_n_s_t
  1951.  
  1952.  
  1953.           Consider the following example:
  1954.  
  1955.  
  1956.           extern void pass_by_const_ref(const int& i);
  1957.  
  1958.           int test(){
  1959.              //This requires -LANG:alias_const to get the performance enhancements
  1960.              int i = 10
  1961.              int j = 15
  1962.              pass_by_const_ref(i);
  1963.              pass_by_const_ref(j);
  1964.              return i + j;
  1965.           }
  1966.  
  1967.  
  1968.  
  1969.           In the example above, the compiler determines that the
  1970.           function pass_by_const_ref does NOT modify its formal
  1971.           parameter i: ie the parameter i passed by const reference
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.                                      - 31 -
  1984.  
  1985.  
  1986.  
  1987.           does NOT get modified in the function. Consequently the
  1988.           compiler can forward propagate the values of i and j to the
  1989.           return statement, whereas it would otherwise have had to
  1990.           reload the values of i and j after the two calls to
  1991.           pass_by_const_ref.
  1992.  
  1993.  
  1994.           (_N_O_T_E: FFFFoooorrrr tttthhhhiiiissss ooooppppttttiiiimmmmiiiizzzzaaaattttiiiioooonnnn ttttoooo wwwwoooorrrrkkkk ccccoooorrrrrrrreeeeccccttttllllyyyy,,,, bbbbooootttthhhh tttthhhheeee
  1995.           ccccaaaalllllllleeeerrrr aaaannnndddd tttthhhheeee ccccaaaalllllllleeeeeeee hhhhaaaavvvveeee ttttoooo bbbbeeee ccccoooommmmppppiiiilllleeeedddd wwwwiiiitttthhhh
  1996.           ----LLLLAAAANNNNGGGG::::aaaalllliiiiaaaassss____ccccoooonnnnsssstttt....).
  1997.  
  1998.  
  1999.           The reason this option is not on by default is that the user
  2000.           can legally cast away the const qualifier and modify the
  2001.           const parameter.
  2002.            With this option the compiler makes an effort to issue
  2003.           warnings when the callee casts away the const and modifies
  2004.           the parameter. For example,
  2005.  
  2006.  
  2007.           void f(const int &x) {int *y = (int *) &x; *y = 99;}
  2008.  
  2009.           int main() {
  2010.             int z;
  2011.             f(z); // call to f does modify z; Hence z needs to be reloaded after the call
  2012.             return z;
  2013.           }
  2014.  
  2015.  
  2016.           With the above example, and -LANG:alias_const, the compiler
  2017.           gives a warning:
  2018.  
  2019.           Compiling f__GRCi
  2020.           "ex9.C", line 2 (col. 28): warning(3334): cast to type "int *" may not be safe
  2021.                     in presence of -LANG:alias_const. Make sure you are not casting away
  2022.                     const to MODIFY the parameter
  2023.  
  2024.  
  2025.           For the above example, it is NOT safe to use
  2026.           -LANG:alias_const.  However, if the user specifies the
  2027.           "mutable" keyword then this const optimization is disabled.
  2028.           For example:
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.                                      - 32 -
  2050.  
  2051.  
  2052.  
  2053.  
  2054.           class C {
  2055.           public:
  2056.             mutable int p;
  2057.             void f() const { p = 99;} //mutable data member can be modified
  2058.                                       // by a const function
  2059.             int getf() const { return p;}
  2060.           };
  2061.  
  2062.           int main() {
  2063.             C c;
  2064.             c.f();// even with -LANG:alias_const, f() can modify c.p
  2065.             return c.getf();
  2066.           };
  2067.  
  2068.           The above example illustrates that in general,
  2069.           alias options should only be used with programs
  2070.           for which they are safe. For instance, -OPT:alias=unnamed
  2071.           and -OPT:alias=restrict are optimizations which are only safe for
  2072.           programs which satisfy the aliasing assumptions made by these
  2073.           optimizations. Hence such options are NOT default for C++ and
  2074.           should be used with caution.
  2075.  
  2076.  
  2077.  
  2078.  
  2079.           1.15.2  _C_o_m_p_i_l_i_n_g__w_i_t_h__-_L_A_N_G_:_e_x_c_e_p_t_i_o_n_s_=_o_f_f__f_o_r__N_O_N_-_E_H__c_o_d_e
  2080.  
  2081.  
  2082.           For code that doesn't throw/catch/propogate exceptions it is
  2083.           beneficial to compile with -LANG:exceptions=off. This
  2084.           permits optimizations that would otherwise be conservative
  2085.           around regions of code that may throw exceptions.
  2086.  
  2087.  
  2088.           1.16  _S_t_a_n_d_a_r_d__T_e_m_p_l_a_t_e__L_i_b_r_a_r_y
  2089.  
  2090.  
  2091.  
  2092.           This release includes the Standard Template Library (STL), a
  2093.           generic container, algorithm, and iterator library.  At
  2094.           present all STL code is in the form of header files, which
  2095.           are located in the directory /_u_s_r/_i_n_c_l_u_d_e/_C_C.  This
  2096.           directory is in the standard include path.
  2097.  
  2098.           This implementation of the STL is backward compatible with
  2099.           the free HP implementation, except that the definitions of
  2100.           stack, queue, and priority_queue have been changed to
  2101.           reflect the interface described by the draft C++ standard.
  2102.           New features, not part of the free HP implementation,
  2103.           include hash tables (defined in _h_a_s_h__s_e_t._h and _h_a_s_h__m_a_p._h),
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.                                      - 33 -
  2116.  
  2117.  
  2118.  
  2119.           singly linked lists (defined in _s_l_i_s_t._h), a scalable string
  2120.           representation (defined in _r_o_p_e._h) and high performance
  2121.           allocators (defined in _a_l_l_o_c._h).  This implementation of the
  2122.           STL is exception-safe and thread-safe.
  2123.  
  2124.           Features present in this release, but that were not present
  2125.           in 7.1, include:
  2126.  
  2127.              +o Exception safety. All STL components are now exception
  2128.                safe.
  2129.  
  2130.              +o New container class: _r_o_p_e. A scalable string
  2131.                representation.
  2132.  
  2133.              +o New container class: _s_l_i_s_t. Singly linked lists.
  2134.  
  2135.              +o Member templates. You can now use the fully general
  2136.                form of containers' copy constructors and insert member
  2137.                functions.  Note that this is only supported in the
  2138.                n32/64 compiler.
  2139.  
  2140.              +o New standard-conforming mechanism for accessing
  2141.                iterators' associated type information:
  2142.                _i_t_e_r_a_t_o_r__t_r_a_i_t_s.  The algorithms _c_o_u_n_t, _c_o_u_n_t__i_f, and
  2143.                _d_i_s_t_a_n_c_e have been rewritten in terms of
  2144.                _i_t_e_r_a_t_o_r__t_r_a_i_t_s.  Note that this is only supported in
  2145.                the n32/64 compiler.
  2146.  
  2147.              +o New algorithms:  _c_o_p_y__n, _l_e_x_i_c_o_g_r_a_p_h_i_c_a_l__c_o_m_p_a_r_e__3_w_a_y,
  2148.                _p_o_w_e_r, _r_a_n_d_o_m__s_a_m_p_l_e, _r_a_n_d_o_m__s_a_m_p_l_e__n,
  2149.                _u_n_i_n_i_t_i_a_l_i_z_e_d__c_o_p_y__n.
  2150.  
  2151.           Allocators in this implementation differ in function and
  2152.           interface from  allocators in the original STL documents.
  2153.           The default allocator, which is called _a_l_l_o_c, is thread-
  2154.           safe.  All containers are parameterized by allocators, so,
  2155.           for example, _l_i_s_t<_i_n_t> is equivalent to _l_i_s_t<_i_n_t, _a_l_l_o_c>.
  2156.           Three other allocators are provided:
  2157.  
  2158.              +o _s_i_n_g_l_e__c_l_i_e_n_t__a_l_l_o_c is faster but not thread-safe.
  2159.  
  2160.              +o _p_t_h_r_e_a_d__a_l_l_o_c is intended for pthreads only. It has
  2161.                better performance for multithreaded code. Objects
  2162.                should be deallocated by the allocating thread.  It is
  2163.                defined in _p_t_h_r_e_a_d__a_l_l_o_c._h.
  2164.  
  2165.              +o _m_a_l_l_o_c__a_l_l_o_c, which is preferable for use with Purify
  2166.                or other memory debugging tools.
  2167.  
  2168.              +o _d_e_b_u_g__a_l_l_o_c, an instrumenting allocator adaptor. It
  2169.                checks for improper deallocation calls in STL-
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.                                      - 34 -
  2182.  
  2183.  
  2184.  
  2185.                conformant containers.
  2186.  
  2187.           Ropes (_r_o_p_e._h in /_u_s_r/_i_n_c_l_u_d_e/_C_C) provide a scalable string
  2188.           implementation.  They are ideally suited to applications
  2189.           which must handle arbitrarily long strings with consistent
  2190.           performance, but for which in-place single-character updates
  2191.           are rare.  The time required to concatenate two ropes is
  2192.           almost independent of their length.  The interface is
  2193.           similar to, but not identical to that of basic_string
  2194.           defined in the current C++ draft standard.  The STL
  2195.           Programmer's Guide contains a more detailed description of
  2196.           both the rope interface, and the issues surrounding string
  2197.           representations in C++.
  2198.  
  2199.           The file _m_s_t_r_i_n_g._h, located in /_u_s_r/_i_n_c_l_u_d_e/_C_C, is not part
  2200.           of the STL.  It is a public domain string class written by
  2201.           Modena, and it is included for the sake of convenience. It
  2202.           is not recommended for multithreaded use.
  2203.  
  2204.  
  2205.  
  2206.           1.17  _N_e_w__t_e_m_p_l_a_t_e_-_b_a_s_e_d__c_o_m_p_l_e_x__n_u_m_b_e_r__l_i_b_r_a_r_y
  2207.  
  2208.           This release includes the template class _c_o_m_p_l_e_x, as
  2209.           described in in the draft C++ standard.  Single-precision
  2210.           complex numbers are _c_o_m_p_l_e_x<_f_l_o_a_t>, double-precision are
  2211.           _c_o_m_p_l_e_x<_d_o_u_b_l_e>, and quad precision are _c_o_m_p_l_e_x<_l_o_n_g
  2212.           _d_o_u_b_l_e>.  The template _c_o_m_p_l_e_x is declared in the header
  2213.           file _c_o_m_p_l_e_x._h.
  2214.  
  2215.           Note that this is a change from previous compiler releases:
  2216.           previous releases instead included a complex number class
  2217.           that was not a template, and that only supported double-
  2218.           precision
  2219.            complex numbers.
  2220.  
  2221.           If you are migrating code from an earlier compiler release,
  2222.           then you can either modify your code (by changing all
  2223.           instances of _c_o_m_p_l_e_x to _c_o_m_p_l_e_x<_d_o_u_b_l_e>) or else you can
  2224.           continue to use the non-template class.  You can select the
  2225.           non-template complex class by defining the macro
  2226.           __N_O_N__T_E_M_P_L_A_T_E__C_O_M_P_L_E_X before including the header _c_o_m_p_l_e_x._h.
  2227.  
  2228.           The template-based complex class is only supported on the
  2229.           n32/64 compilers.  If you are using the ucode (o32)
  2230.           compiler, then __N_O_N__T_E_M_P_L_A_T_E__C_O_M_P_L_E_X will be defined
  2231.           automatically.
  2232.  
  2233.           Regardless of whether you are using the newer template-based
  2234.           complex class or the older non-template class, the complex
  2235.           library is not automatically loaded by the C++ compiler.
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.  
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.                                      - 35 -
  2248.  
  2249.  
  2250.  
  2251.           You must explicitly provide a command-line option telling
  2252.           the compiler to link the complex library.  (This is expected
  2253.           to change in a future release.)  You must also include the
  2254.           math library, -_l_m.
  2255.  
  2256.           To use the newer, template-based complex library, include
  2257.           the options
  2258.  
  2259.               -lComplex -lm
  2260.  
  2261.           To use the older, non-template complex library, include the
  2262.           options
  2263.  
  2264.               -lcomplex -lm
  2265.  
  2266.  
  2267.  
  2268.           1.18  _R_o_g_u_e__W_a_v_e__T_o_o_l_s_._h_+_+
  2269.  
  2270.           Tools.h++ 7.03 is bundled with this release. The previous
  2271.           version of Tools.h++ is no longer supported.
  2272.  
  2273.  
  2274.           1.19  _K_n_o_w_n__P_r_o_b_l_e_m_s__a_n_d__W_o_r_k_a_r_o_u_n_d_s
  2275.  
  2276.           This section describes the known problems with the current
  2277.           release of the C++ product and how to work around them.
  2278.           Some of the descriptions are followed by a Silicon Graphics,
  2279.           Inc., bug report number in the form
  2280.           (Bug #xxxxx). Unless stated otherwise, the bugs described
  2281.           below affect the 64-bit and n32 compilation modes.
  2282.  
  2283.            +o The standard library as described in the draft standard
  2284.              is not yet completely implemented.
  2285.  
  2286.            +o CC does not inline sqrt by default (Bug #439787).
  2287.  
  2288.              Unlike cc, the n32 and 64-bit C++ compiler does not by
  2289.              default use built-in operations to compute square roots,
  2290.              nor does it treat functions from the standard math
  2291.              library as having no side effects. The problem is that a
  2292.              strict application of the standard requires that many of
  2293.              these functions in fact have side effects under error
  2294.              conditions, such as a negative argument passed to the
  2295.              sqrt function.
  2296.  
  2297.              To force use of the square root operations for evaluating
  2298.              the functions sqrt and sqrtf, use the commandline option
  2299.              -D__INLINE_INTRINSICS.  To improve performance of code
  2300.              using other functions in the standard math library use
  2301.              the option -D__MATH_HAS_NO_SIDE_EFFECTS.
  2302.  
  2303.  
  2304.  
  2305.  
  2306.  
  2307.  
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.                                      - 36 -
  2314.  
  2315.  
  2316.  
  2317.            +o Exception runtime failures (Bug #405567).
  2318.  
  2319.              Runtime assertion errors will result if an exception is
  2320.              thrown as a result of reaching the per process file
  2321.              descriptor limit or if there is no more memory available.
  2322.              The default operator new does not throw an exception when
  2323.              allocation of requested storage fails.
  2324.  
  2325.            +o Under certain very rare circumstances, a compiler
  2326.              internal error results in the message "A goto outside a
  2327.              region cannot jump to a label inside a region."  This
  2328.              error occurs only when exceptions are enabled, and is
  2329.              known to occur only when a natural if-then-else is
  2330.              written with if's and goto's:  e.g.
  2331.  
  2332.                 if (n == 0) goto label1;
  2333.                 goto label2;
  2334.              label1:
  2335.                 ...
  2336.              label2:
  2337.                 ...
  2338.  
  2339.              If the source cannot be rewritten, then the program
  2340.              should be compiled with -LANG:exceptions=off.
  2341.  
  2342.            +o The use of -anach with -n32 is deprecated (Bug #514250)
  2343.  
  2344.              The following example (see the function proc_bad)
  2345.              illustrates a style of function definition (similar to
  2346.              the K&R mode in C) which was supported with the -anach
  2347.              flag in the ucode compilers for historical reasons. The
  2348.              C++ standard requires the user to write the function in a
  2349.              style consistent with the ANSI C style (see the function
  2350.              proc_good).
  2351.  
  2352.              With CC -32 -anach the code compiles and produces correct
  2353.              results (values of 123 and 123 get printed). With CC -n32
  2354.              -anach the code does compile, however it produces
  2355.              incorrect results (a value of 123, and 0 get printed).
  2356.  
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.  
  2373.  
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.                                      - 37 -
  2380.  
  2381.  
  2382.  
  2383.                    #include <stdio.h>
  2384.  
  2385.                    class C
  2386.                    {
  2387.                    public:
  2388.                      int v;
  2389.                      C() { v = 123; };
  2390.                      C(C& ob) { v = ob.v; };
  2391.                    };
  2392.  
  2393.                    int proc_good(C c) { return c.v; }
  2394.                    int proc_bad(c) C c; { return c.v; } // rewrite as proc_good
  2395.  
  2396.                    main()
  2397.                    {
  2398.                      C c;
  2399.                      printf("%d0, proc_good(c));
  2400.                      printf("%d0, proc_bad(c));
  2401.                    }
  2402.  
  2403.              We suggest that the function proc_bad  be rewritten as
  2404.              proc_good to conform to the C++ standard. Such a source
  2405.              transformation can even be done using a script.
  2406.  
  2407.            +o C/C++ internal error (Bug #480882).
  2408.              The C/C++ compilers reserve the charcaters 0x81 and 0x82.
  2409.              Usage of these characters might either cause the compiler
  2410.              to core dump or emit the following error:  Internal error
  2411.              loop: nested_source_line_modif: bad address
  2412.  
  2413.  
  2414.            +o The MIPSpro C++ compiler will abort if the license file
  2415.              directory (/var/flexlm) contains a cycle formed by
  2416.              symbolic links.  For example:
  2417.  
  2418.              %ls -l /var/flexlm
  2419.              lrwxr-xr-x    1 root   sys       1 Mar 13  1996 license -> .
  2420.              -rw-r--r--    1 root   sys    1162 Aug 20 17:09 license.dat
  2421.  
  2422.              %CC foo.cpp
  2423.              Bus error (core dumped)
  2424.  
  2425.              The solution is to remove the symbolic link that forms
  2426.              the cycle.
  2427.  
  2428.            +o Cryptic warning message from licensing.
  2429.  
  2430.              The first line of a warning message that occurs when a
  2431.              license file exists under /var/flexlm but does not
  2432.              contain the compiler license can be misleading. For
  2433.              completeness the following example illustrates the entire
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.  
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.                                      - 38 -
  2446.  
  2447.  
  2448.  
  2449.              output when a license file exists, but a license is not
  2450.              installed:
  2451.  
  2452.              %CC foo.cpp
  2453.              No such feature exists (-5,116)
  2454.  
  2455.               The MIPSpro C++ Compiler
  2456.               (license FEATURE string = cpp)
  2457.               requires a license password.
  2458.  
  2459.               For license installation and trouble shooting
  2460.               information visit the web page:
  2461.  
  2462.                       http://www.sgi.com/Support/Licensing/install_docs.html
  2463.  
  2464.               To obtain a Permanent license (proof of purchase
  2465.               required) or an Evaluation license please
  2466.               visit our license request web page:
  2467.  
  2468.                       http://www.sgi.com/Products/license.html
  2469.  
  2470.                       or send a blank email message to:
  2471.  
  2472.                       license@sgi.com
  2473.  
  2474.               In North America, Silicon Graphics' customers may request
  2475.               Permanent licenses by sending a facsimile to:
  2476.  
  2477.                       (650) 932-0537
  2478.  
  2479.                       or by calling our technical support hotline
  2480.  
  2481.                       1-800-800-4SGI
  2482.  
  2483.               If you are Outside of North America or you are not a Silicon
  2484.               Graphics support customer then contact your local support provider.
  2485.  
  2486.  
  2487.  
  2488.  
  2489.            +o Overloaded use of LM_LICENSE_FILE
  2490.  
  2491.              Although this is not a bug, compiler users often have
  2492.              environments which specify the LM_LICENSE_FILE variable
  2493.              with a license file that contains licenses for other
  2494.              software.  If, however, the compiler licenses are not
  2495.              installed in this alternate license file, compilations
  2496.              will generate the warning message illustrated below. The
  2497.              remedy is to either not use the LM_LICENSE_FILE variable
  2498.              or to set it to its old value followed by a colon (:) and
  2499.              the file that contains the compiler licenses.
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.  
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.                                      - 39 -
  2512.  
  2513.  
  2514.  
  2515.              For Example:
  2516.  
  2517.              %echo $LM_LICENSE_FILE
  2518.              /usr/john_doe/license.dat
  2519.              %CC foo.cpp
  2520.              No such feature exists (-5,116:2) No such file or directory
  2521.  
  2522.               The MIPSpro C++ Compiler
  2523.               (license FEATURE string = cpp)
  2524.               requires a license password.
  2525.  
  2526.               For license installation and trouble shooting
  2527.               information visit the web page:
  2528.  
  2529.                       http://www.sgi.com/Support/Licensing/install_docs.html
  2530.  
  2531.               To obtain a Permanent license (proof of purchase
  2532.               required) or an Evaluation license please
  2533.               visit our license request web page:
  2534.  
  2535.                       http://www.sgi.com/Products/license.html
  2536.  
  2537.                       or send a blank email message to:
  2538.  
  2539.                       license@sgi.com
  2540.  
  2541.               In North America, Silicon Graphics' customers may request
  2542.               Permanent licenses by sending a facsimile to:
  2543.  
  2544.                       (650) 932-0537
  2545.  
  2546.                       or by calling our technical support hotline
  2547.  
  2548.                       1-800-800-4SGI
  2549.  
  2550.               If you are Outside of North America or you are not a Silicon
  2551.               Graphics support customer then contact your local support provider.
  2552.  
  2553.  
  2554.              %setenv LM_LICENSE_FILE /usr/john_doe/license.dat:/var/flexlm/license.dat
  2555.              %echo $LM_LICENSE_FILE
  2556.              /usr/john_doe/license.dat:/var/flexlm/license.dat
  2557.              %CC foo.cpp
  2558.              %
  2559.  
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.  
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.                                      - 40 -
  2578.  
  2579.  
  2580.  
  2581.           1.20  _B_u_g_s__F_i_x_e_d__S_i_n_c_e__t_h_e__L_a_s_t__R_e_l_e_a_s_e
  2582.  
  2583.  
  2584.  
  2585.              +o Making a static/extern _l_o_c_a_l in a mp region was not
  2586.                implemented for MIPSpro 7.2.
  2587.  
  2588.                Consider the following example:  The variable _i
  2589.                declared as a _s_t_a_t_i_c _i_n_t is being made local in the
  2590.                parallel region.  The semantics of _l_o_c_a_l dictate that a
  2591.                local copy is made within each process and the local
  2592.                copy is initialized to -3.
  2593.  
  2594.                However, the call to _f() within the parallel region
  2595.                also refers to _i which should still get the value
  2596.                assigned to the _s_t_a_t_i_c _i_n_t ( i.e. 44).  This is indeed
  2597.                the observed behavior when _f() is not inlined. However,
  2598.                if _f() is inlined, the _i that it refers to gets a value
  2599.                of -3.
  2600.  
  2601.                This has been fixed (Bug #437716).
  2602.  
  2603.  
  2604.              +o Internal error with exceptions and IPA
  2605.  
  2606.                Under rare circumstances (when exceptions are on and
  2607.                when compiling with -IPA and when certain other
  2608.                conditions apply) the compiler may generate an internal
  2609.                error. As a workaround we suggest with -IPA:clone=off,
  2610.                or if the code doesn't throw or catch or propogate
  2611.                exceptions, compiling with -LANG:exceptions=off.
  2612.  
  2613.                This has been fixed (Bug# 512292).
  2614.  
  2615.  
  2616.              +o Generating an assembly language file using -S can cause
  2617.                a coredump if extremely long names (such as those
  2618.                generated by C++ template functions) are involved. This
  2619.                has been fixed (Bug #707102).
  2620.  
  2621.  
  2622.              +o Under certain circumstances, code compiled -32 -O2
  2623.                would cause a Trace/BPT trap when executed. This has
  2624.                been fixed (Bug #532558)
  2625.  
  2626.  
  2627.              +o Limit on number of files which could be compiled from
  2628.                one CC command line when floating licenses were used
  2629.  
  2630.                The C++ compiler would stop and issue the following
  2631.                warnings when trying to compile more files than the
  2632.  
  2633.  
  2634.  
  2635.  
  2636.  
  2637.  
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.                                      - 41 -
  2644.  
  2645.  
  2646.  
  2647.                open file descriptor limit on a single command line
  2648.                under floating licensing.
  2649.  
  2650.                For Example:
  2651.                   (Floating Licenses being used)
  2652.  
  2653.                %limit descriptors
  2654.                descriptors     200
  2655.  
  2656.                %CC  *.cpp          (more than 200 .cpp files in current directory)
  2657.                file196.cpp:
  2658.                CC: Error: can't create output file: /tmp/ctmpa001YG
  2659.                   : Too many open files
  2660.  
  2661.  
  2662.                This has been fixed (Bug 556876).
  2663.  
  2664.  
  2665.  
  2666.  
  2667.  
  2668.  
  2669.  
  2670.  
  2671.  
  2672.  
  2673.  
  2674.  
  2675.  
  2676.  
  2677.  
  2678.  
  2679.  
  2680.  
  2681.  
  2682.  
  2683.  
  2684.  
  2685.  
  2686.  
  2687.  
  2688.  
  2689.  
  2690.  
  2691.  
  2692.  
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.  
  2703.  
  2704.  
  2705.  
  2706.